projectDir=`pwd -W`
inputRootDir=$projectDir/01_input
scriptRootDir=$projectDir/02_script
buildRootDir=$projectDir/03_build
outputRootDir=$projectDir/04_output
inputLibDir=$inputRootDir/wxWidgets-3.2.4
[[ ! -e $scriptRootDir ]] && mkdir $scriptRootDir
[[ ! -e $buildRootDir ]] && mkdir $buildRootDir
[[ ! -e $outputRootDir ]] && mkdir $outputRootDir
cd $buildRoot
flags=""
flags+=" --prefix=$outputRootDir"
# regex正则表达式模块编译有问题
# flags+="  --without-regex"
# flags+="  --without-libpng"
# flags+="  --without-libjpeg"
# flags+="  --without-libtiff"
# flags+="  --without-expat"
flags+=" --srcdir=$inputLibDir"
isConfigure="Y"
if [[ $isConfigure == "Y" ]]; then
    echo "configure..."
    rm -rf $buildRootDir && mkdir $buildRootDir && cd $buildRootDir
    $projectDir/01_input/wxWidgets-3.2.4/configure $flags
    [[ $? != 0 ]] && configure failed && exit -1
fi
isMake="N"
if [[ $isMake == "Y" ]]; then
    cd $buildRootDir
    make
fi